<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <title>汇报</title>
    <link rel="stylesheet" type="text/css" href="../../css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <script src="../../js/mui.min.js"></script>
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/vue.js"></script>
    <script src="../../js/main.js"></script>
    <script>
        var u = navigator.userAgent;
        var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
        var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
    </script>
</head>
<body>
<div id="app">
    <header class="mui-bar mui-bar-nav">
        <span class="back" @click="back"></span>
        <h1 class="mui-title">汇报</h1>
    </header>
    <div class="mui-content">
        <div class="report-type-title">
            <div class="report-logo fl">
                <img src="../../images/report/zhixin_huibao_hblx_icon.png"/>
            </div>
            <div class="report-type-name">汇报类型</div>
        </div>
        <ul class="report-type">
            <li>
                <a href="daily.html">
                    <div class="day"></div>
                    <p>日报</p>
                </a>
            </li>
            <li>
                <a href="weekly.html">
                    <div class="week"></div>
                    <p>周报</p>
                </a>
            </li>
            <li>
                <a href="monthly.html">
                    <div class="month"></div>
                    <p>月报</p>
                </a>
            </li>
            <div class="clear"></div>
        </ul>
        <ul class="report-footer new-footer">
            <li>
                <a href="###">
                    <div>
                        <img src="../../images/report/zhixin_huibao_xhb_click_icon.png"/>
                    </div>
                    <p style="color: rgb(44,154,232)">写汇报</p>
                </a>
            </li>
            <li>
                <a href="report_check.html">
                    <div>
                        <img src="../../images/report/zhixin_huibao_khb_icon.png"/>
                    </div>
                    <p>看汇报</p>
                </a>
            </li>
            <div class="clear"></div>
        </ul>
    </div>
</div>
</body>
<script>
    function UrlSearch(){
        var name,value;
        var str=location.href; //取得整个地址栏
        var num=str.indexOf("?");
        str=str.substr(num+1); //取得所有参数   stringvar.substr(start [, length ]

        var arr=str.split("&"); //各个参数放到数组里
        for(var i=0;i < arr.length;i++){
            num=arr[i].indexOf("=");
            if(num>0){
                name=arr[i].substring(0,num);
                value=arr[i].substr(num+1);
                this[name]=value;
            }
        }
    }
    var Request = new UrlSearch(); //实例化
    localStorage.userName = Request.loginName;
    localStorage.companyId = Request.companyId;
    localStorage.token = Request.token;

    function sendInfoToJava(name) {
        //调用android程序中的方法，并传递参数
        javascript:WebView.showInfoFromJs(name);
    }

    function showInfoFromIos(companyId,loginName){
        localStorage.companyId = companyId;
        localStorage.userName = loginName;
    }

    function showInfo(name,token){
        localStorage.fullName = name;
        localStorage.token = token;
    }

    //在android代码中调用此方法
    function showInfoFromJava(msg){
        localStorage.fullName = msg;
    }
    var app = new Vue({
        el: "#app",
        data: function () {
            return{

            }
        },
        methods: {
            back: function () {
                var name = "back";
                sendInfoToJava(name);
            }
        }
    });
</script>
</html>
